package com.mht2017.common.response;

import com.mht2017.common.consts.ResultCode;

/**
 * @author yutong.xiao
 * Date: 2018/7/18
 * Time: 15:21
 * Write an elegant code
 */
public class SuccessMessageResponse extends BaseMessageResponse{
    /**
     * 返回编码
     */
    private String code = ResultCode.SUCCESS_CODE.getCode();

    /**
     * 异常信息
     */
    private String message = ResultCode.SUCCESS_CODE.getName();

    /**
     * 消息体
     */
    private Object data;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public Object getData() {
        return data;
    }

    @Override
    public void setData(Object data) {
        this.data = data;
    }

    public SuccessMessageResponse(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public SuccessMessageResponse(Object data) {
        this.data = data;
    }
}
